package com.yt.order.models.service;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.yt.order.models.bo.*;
import com.yt.order.models.dto.WorkOrderInfoDTO;
import com.yt.order.models.vo.EmployeeCommissionStatVO;
import com.yt.order.models.vo.WorkOrderInfoVO;
import com.yt.order.models.vo.WorkOrderStatisticVO;

import java.util.Date;
import java.util.List;

/**
 * 工单信息服务
 *
 * @author chen
 * @Date 2025-09-05 18:26:57
 */
public interface IWorkOrderInfoService extends IService<WorkOrderInfoDTO> {
    boolean add(WorkOrderInfoSaveBO saveBO);

    WorkOrderInfoVO selectVoById(Long id);
    Page<WorkOrderInfoVO> selectPageVo(Page<WorkOrderInfoVO> page, WorkOrderInfoBO bo);
    List<WorkOrderInfoVO> selectVoByTitle(String title);

    WorkOrderStatisticVO statistic(WorkOrderStatisticBO bo);
    List<WorkOrderInfoVO> filterWorkOrders(WorkOrderFilterBO bo);

    Page<WorkOrderInfoVO> selectPageVoByTitle(Page<WorkOrderInfoVO> page, String title);

    boolean dispatch(WorkOrderDispatchBO dispatchBO);
    Page<WorkOrderInfoVO> selectUnassignedPage(Page<WorkOrderInfoVO> page, WorkOrderInfoBO bo);

    EmployeeCommissionStatVO statEmployeeCommission(Long employeeId, Date startTime, Date endTime);

    boolean archiveCompletedOrders();
}
